package a.e;

import a.j.g;
import org.w3c.dom.Document;

import javax.xml.transform.*;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.stream.StreamSource;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class q
  extends e
{
  private h c;
  private Source d;
  public static boolean e;
  
  public q()
  {
    this(new h());
  }
  
  public q(h paramh)
  {
    a(paramh);
  }
  
  public String a()
  {
    return "XML + XSL";
  }
  
  public String b()
  {
    return "";
  }
  
  public boolean d()
  {
    return false;
  }
  
  public void a(Source paramSource)
  {
    this.d = paramSource;
  }
  
  public Source f()
  {
    return this.d;
  }
  
  public void a(h paramh)
  {
    this.c = paramh;
  }
  
  public e g()
  {
    return this.c;
  }
  
  public void a(g paramg, OutputStream paramOutputStream)
    throws IOException
  {
    throw new UnsupportedOperationException("Write not supported");
  }
  
  public void a(g paramg, InputStream paramInputStream)
    throws IOException
  {
    if (e.b == 0) {
      if (this.c == null) {
        throw new IllegalStateException("No reader delegate set.");
      }
    }
    if (this.d == null) {
      throw new IllegalStateException("No XSL source set.");
    }
    try
    {
      TransformerFactory localTransformerFactory = TransformerFactory.newInstance();
      Transformer localTransformer = localTransformerFactory.newTransformer(this.d);
      StreamSource localStreamSource = new StreamSource(paramInputStream);
      DOMResult localDOMResult = new DOMResult();
      localTransformer.transform(localStreamSource, localDOMResult);
      this.c.a(paramg, (Document)localDOMResult.getNode());
    }
    catch (TransformerConfigurationException localTransformerConfigurationException)
    {
      throw new IOException("TransformerConfigurationException:" + localTransformerConfigurationException.getMessage());
    }
    catch (TransformerException localTransformerException)
    {
      throw new IOException("TransformerException:" + localTransformerException.getMessage());
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.q

 * JD-Core Version:    0.7.0.1

 */